package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Region;
import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.domain.TravelComment;
import cn.wolfcode.trip.base.domain.TravelContent;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ITravelService {
    /**
     * 分页查询
     * @param qo
     * @return
     */
    PageInfo query(TravelQueryObject qo);

    void save(Travel travel);

    /**
     * 获取指定游记的id
     * @param id
     * @return
     */
    Travel getTrave(Long id);

    /**
     * 更新游记
     * @param travel
     */
    void put(Travel travel);

    /**\
     *
     *修改游记的状态
     * @param travel
     */
    void updateState(Travel travel);

    /**
     * 获得指定内容的id
     * @param id
     * @return
     */
    TravelContent getContentByTravelId(Long id);

    List<Travel> gettravelsByStrategyId(Long strategyId);

    void deleteRelation(Long strategyId, Long travelId);

    List<Travel> getRegionTravelByStrategyId(Long trategyId);

    void saveRelation(Long strategyId, Long travelId);

    /**
     * 将文章的点赞数量减一
     */
    void subGreatNum(Long travelId);

    /**
     * 文章的点赞数量加一
     * @param travelId
     */
    void addGreatNum(Long travelId);

    /**
     * 文章的评论数加一
     * @param travelComment
     */
    void addCommentNum(TravelComment travelComment);

    /**
     * 查询指定游记的评论
     * @param id
     * @return
     */
    Object getCommentsByTravelId(Long id);

    int selectGreatByTravelId(Long id);

    PageInfo selectTavelsByuserId(TravelQueryObject qo,Long id);
}
